package com.zzs.group.manager.enums;

public enum GroupMemberLevelEnum {
    /**
     * 一般群成员
     */
    MEMBER("群成员"), // ordinal = 0

    /**
     * 管理员
     */
    ADMINISTRATOR("管理员"), // ordinal = 1

    /**
     * 群主
     */
    OWNER("群主"); // ordinal = 2

    String levelName;

   public static String getLevelName(int level){
        GroupMemberLevelEnum[] values = GroupMemberLevelEnum.values();
        for (GroupMemberLevelEnum value : values) {
            if (value.ordinal() == level) {
                return value.levelName;
            }
        }
        return null;
    }

    GroupMemberLevelEnum(String levelName) {
        this.levelName = levelName;
    }
}
